A line of C code needs to be executed to tell KFLOP that KSTEP is present so it will multiplex in all the inputs. Add: KStepPresent=TRUE;
to a C program. Have you done this?
See Digital Status :
http://www.dynomotion.com/Help/SchematicsKStep/UsingKStep.htm
Regards TK
Group: DynoMotion |
Message: 6674 |
From: Jing Zhang |
Date: 2/6/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi, TK,
I did not add that line. So the states from (168~183) in virtual/kstep of digital I/O can not be chosen before the line is added, right? How could I add that line just in kmotion, either in console or C program? I am using kmotion/kflop version 4.28. Thanks
Best
Jing
Group: DynoMotion |
Message: 6675 |
From: Tom Kerekes |
Date: 2/6/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi Jing,
Yes you must execute that line in a C program. The example InitKStep3Axis.c already has it.
or you can make a 1 line program like this:
#include "KMotionDef.h" int main() { KStepPresent=TRUE; // enable KSTEP input multiplexing }
Please use a more up to date Version. Preferably our Test Version:
http://dynomotion.com/Software/KMotion430j.exe
Regards TK
Group: DynoMotion |
Message: 6676 |
From: Jing Zhang |
Date: 2/6/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi, Tom,
I am trying it now. I will let you know the result.
Best
Jing
Group: DynoMotion |
Message: 6677 |
From: Jing Zhang |
Date: 2/6/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi, Tom,
I updated my kmotion to version4.30j, while in my program, there appeared some error during compiling, ''CKMotionDLL::WriteLine' : function does not take 2 arguments." I noticed there are some change in the new CoordinateMotion class. The previous 'int m_board;' disappears in the new version, and there are less argument for writeline (without m_board), so how do you decide which board to choose? Could you please send me some examples in C++ regarding the change?
Best
Jing
Group: DynoMotion |
Message: 6678 |
From: Tom Kerekes |
Date: 2/6/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi Jing,
Yes sorry that was changed to make things more object oriented. The board is now specified when the CKMotionDLL object is created.
There are a
number of C++ examples included in the download. See the SimpleConsole.cpp file.
HTH Regards TK
Group: DynoMotion |
Message: 6680 |
From: Jing Zhang |
Date: 2/6/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi, Tom,
The opto inputs on kstep worked finally. The kmotion I am using is newest version now. Thanks.
Best
Jing
Group: DynoMotion |
Message: 6711 |
From: Jing Zhang |
Date: 2/12/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Hi, Tom,
I want to integrate this opto input function in my own program. I do not see any structure that contains KStepPresent, you know how I could do this?
Best
Jing
Group: DynoMotion |
Message: 6712 |
From: Tom Kerekes |
Date: 2/12/2013 |
Subject: Re: Opto input from Kstep with 12V power supply |
Jing, You would need to have your program Compile Download Execute a C program.
See the SimpleFormsCS example.
Regards TK
| | | | | | | | | | | | | | | | | |